package detect;

import java.util.Arrays;

public class Log {
	private static int indence=0;
	private static String blankStr=null;
	static{
		char[] blankChars=new char[100];
		Arrays.fill(blankChars, ' ');
		blankStr=new String(blankChars);
	}
	public static void error(String error,String expStr){
		System.err.println("Error: "+error+" in '"+expStr+"'");
	}
	
	public static void incIndence(){
		indence+=3;
	}
	
	public static void decIndence(){
		indence-=3;
	}
	
	public static void printTree(String tree){
		System.out.print(blankStr.substring(0,indence));
		System.out.println(tree+" ("+indence+")");
	}
	
}
